
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="format-detection" content="telephone=no">
  <title>后台</title>
  <link rel="stylesheet" href="/static/backend/layui/css/layui.css">
  <link rel="stylesheet" href="/static/backend/css/global.css">
  <style>
    iframe{border: none;}
    .layui-layout-admin .layui-header {
    background-color: #393d49;
    }
    .layui-layout-admin .layui-body{
        left: 0;
    } 
    .Bgcolor{
        background-color: #009688;
    }
  </style>
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">后台管理系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
          {:session('admin_name')}
        </a>
      </li>
      <li class="layui-nav-item" id="logout_fan"><a href="javascript:;">退出</a></li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item"><a class="conto">首页</a></li>
        <li class="layui-nav-item">
          <a href="javascript:;">会员管理</a>
          <dl class="layui-nav-child">
              <dd data="backend/user/index"><a class="vipuser">会员列表</a></dd>
              <dd data="backend/withdrawal/index"><a class="vipuser">提现列表</a></dd>
            <!--  <dd data="backend/user/jiegou"><a class="vipuser">推荐结构</a></dd>-->
          </dl>
        </li>

          <li class="layui-nav-item">
              <a href="javascript:;">记录管理</a>
              <dl class="layui-nav-child">
                  <dd data="backend/recharge/integral"><a>积分记录</a></dd>
                  <dd data="backend/recharge/wallet"><a >余额记录</a></dd>
              </dl>
          </li>
          <li class="layui-nav-item">
              <a href="javascript:;">积分兑换</a>
              <dl class="layui-nav-child">
                  <dd data="backend/redeem/index"><a class="vipuser">积分兑换列表</a></dd>
                    <dd data="backend/redeem/integral"><a class="vipuser">积分兑换申请列表</a></dd>
                    <dd data="backend/redeem/integral_ranking"><a class="vipuser">积分排行榜</a></dd>
              </dl>
          </li>
          <li class="layui-nav-item">
              <a href="javascript:;">优惠券管理</a>
              <dl class="layui-nav-child">
                  <dd data="backend/coupon/cat_list"><a class="vipuser">优惠券分类</a></dd>
                  <dd data="backend/coupon/index"><a class="vipuser">优惠券列表</a></dd>
              </dl>
          </li>
        <li class="layui-nav-item">
          <a href="javascript:;">系统设置</a>
          <dl class="layui-nav-child">
              <dd data='backend/config/banner'><a>轮播图片</a></dd>
              <dd data='backend/config/sms_config'><a>短信配置</a></dd>
              <dd data='backend/reward/direct'><a>奖励设置</a></dd>
              <dd data='backend/reward/jiandian'><a>邀请设置</a></dd>
              <dd data='backend/reward/customer'><a>客服设置</a></dd>
              <dd data='backend/reward/poster'><a>海报管理</a></dd>
              <dd data='backend/message/index'><a>留言管理</a></dd>
              <dd data='backend/message/raiders'><a>旅游攻略</a></dd>
              <dd data='backend/message/my_team'><a>我的团队设置</a></dd>
              <dd data='backend/config/check_in'><a>积分签到设置</a></dd>
    <!--              <dd data='backend/config/notice_list'><a>公告管理</a></dd>
              <dd data='backend/config/about'><a>关于我们</a></dd>
              <dd data='backend/config/close'><a>关闭网站</a></dd>
             <!--<dd data='backend/config/index'><a>管理员</a></dd>-->
          </dl>
        </li>
        <!-- <li class="layui-nav-item layui-nav-itemed">
          <a href="javascript:;">用户管理</a>
          <dl class="layui-nav-child">
            <dd><a class="layui-this" href="admin.html">用户列表</a></dd>
          </dl>
        </li> -->
       <!-- <li class="layui-nav-item">
            <a href="javascript:;">权限管理</a>
            <dl class="layui-nav-child">
                <dd><a href="rule.html">规则列表</a></dd>
                <dd><a href="role.html">角色列表</a></dd>
                <dd><a href="adminRole.html">用户角色</a></dd>
            </dl>
        </li>

        <li class="layui-nav-item">
            <a href="javascript:;">开发者工具</a>
            <dl class="layui-nav-child">
                <dd><a href="control.html">一键生成</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;">集成Demo</a>
            <dl class="layui-nav-child">
                <dd><a href="upload.html">文件上传</a></dd>
                <dd><a href="upload.html">Execel导出</a></dd>
            </dl>
        </li>-->
          <li class="layui-nav-item">
              <a href="javascript:;">商城管理</a>
              <dl class="layui-nav-child">
                  <dd data="backend/goods_category/index"><a class="vipuser">商品分类</a></dd>
              </dl>
              <dl class="layui-nav-child">
                  <dd data="backend/goods/index"><a class="vipuser">商品列表</a></dd>
              </dl>
              <dl class="layui-nav-child">
                  <dd data="backend/goods_order/index"><a class="vipuser">商品订单列表</a></dd>
              </dl>
            <!--  <dl class="layui-nav-child">
                  <dd data="backend/business/index"><a class="vipuser">商家入驻</a></dd>
              </dl>-->
          </li>
      </ul>
    </div>
  </div>
  <div class="layui-body">
      <iframe frameborder="0" width="100%" height="100%"; class="Iframe"></iframe>
  </div>
</div>
<script type="text/javascript" src="/static/backend/javascript/jquery.min.js"></script>
<script type="text/javascript" src="/static/backend/layui/layui.js"></script>
<script type="text/javascript" src="/static/backend/javascript/dw.js"></script>
<script>
    $('#logout_fan').click(function(){
        $.ajax({
            url:'/backend/login/logout',
            type:'POST',
            dataType:'json',
            success:function(res){
                if(res.code==1){
                    layui.use('layer', function(){
                        layer.msg('退出成功', {
                            icon: 1,
                            time:1500,
                            end:function(){
                                location.reload(true);
                            }
                        });
                    });
                }
            }
        })
    });


    var str = localStorage.getItem('lastObj');
    var newObj = JSON.parse(str);
    if(!str){
        $('.layui-nav-tree').find('li').eq(1).addClass('layui-nav-itemed');
        $('.vipuser').addClass('Bgcolor');
        $('.Iframe').attr('src','/backend/index/main');
    }else{
        $('.Iframe').attr('src',newObj.url);
        $('.layui-nav-tree').find('li').siblings().removeClass('layui-nav-itemed');
        $('.layui-nav-tree').find('li').eq(newObj.icon).addClass('layui-nav-itemed');
        $('.vipuser').removeClass('Bgcolor');
        $('.layui-nav-tree li').eq(newObj.icon).find('dd').find('a').eq(newObj.bgcolor).addClass('Bgcolor')
    }   




    $('.layui-nav-child dd').click(function(){
    $('.Iframe').attr('src','/'+ $(this).attr('data'));
    $('.layui-nav-tree').find('li').siblings().removeClass('layui-nav-itemed');
    $(this).parents('li').addClass('layui-nav-itemed');
    $('.vipuser').removeClass('Bgcolor');
    var obj = {
        url:'/'+ $(this).attr('data'),
        icon:$(this).parents('li').index(),
        bgcolor:$(this).index()
    }
    obj = JSON.stringify(obj);
    localStorage.setItem('lastObj',obj);
})


    $('.conto').click(function(){
        $('.Iframe').attr('src','/backend/index/main');
    })
</script>
</body>
</html>